package com.gkj.blog.business.vo.condition;

import com.gkj.blog.business.enums.SexEnum;
import com.gkj.blog.business.enums.UserStatusEnum;
import com.gkj.blog.business.enums.UserTypeEnum;
import com.gkj.blog.business.vo.entity.User;
import com.gkj.blog.framework.object.BaseConditionVO;

import java.util.Date;

public class UserConditionVO extends BaseConditionVO {
    private User user;

    public UserConditionVO() {
        this.user = new User();
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public String getUsername() {
        return user.getUsername();
    }

    public void setUsername(String username) {
        user.setUsername(username);
    }

    public String getPassword() {
        return user.getPassword();
    }

    public void setPassword(String password) {
        user.setPassword(password);
    }

    public String getNickname() {
        return user.getNickname();
    }

    public void setNickname(String nickname) {
        user.setNickname(nickname);
    }

    public String getEmail() {
        return user.getEmail();
    }

    public void setEmail(String email) {
        user.setEmail(email);
    }

    public String getQq() {
        return user.getQq();
    }

    public void setQq(String qq) {
        user.setQq(qq);
    }

    public Byte getSex() {
        String sex = user.getSex();
        if(sex==null)
            return null;
        else if (sex.equals(SexEnum.MAN.getSex()))
            return SexEnum.MAN.getCode();
        else
            return SexEnum.WOMAN.getCode();
    }

    public void setSex(String sex) {
        user.setSex(sex);
    }

    public String getAvatar() {
        return user.getAvatar();
    }

    public void setAvatar(String avatar) {
        user.setAvatar(avatar);
    }

    public String getUserType() {
        UserTypeEnum userType = user.getUserType();
        return userType==null?null:userType.name();
    }

    public void setUserType(String userType) {
        user.setUserType(userType);
    }

    public String getOrigin() {
        return user.getOrigin();
    }

    public void setOrigin(String origin) {
        user.setOrigin(origin);
    }

    public String getRegIp() {
        return user.getRegIp();
    }

    public void setRegIp(String regIp) {
        user.setRegIp(regIp);
    }

    public String getLastLoginIp() {
        return user.getLastLoginIp();
    }

    public void setLastLoginIp(String lastLoginIp) {
        user.setLastLoginIp(lastLoginIp);
    }

    public Date getLastLoginTime() {
        return user.getLastLoginTime();
    }

    public void setLastLoginTime(Date lastLoginTime) {
        user.setLastLoginTime(lastLoginTime);
    }

    public Integer getLoginCount() {
        return user.getLoginCount();
    }

    public void setLoginCount(Integer loginCount) {
        user.setLoginCount(loginCount);
    }

    public String getRemark() {
        return user.getRemark();
    }

    public void setRemark(String remark) {
        user.setRemark(remark);
    }

    public Integer getStatus() {
        return user.getStatus().getCode();
    }

    public void setStatus(Integer status) {
        user.setStatus(status);
    }

    public Long getId() {
        return user.getId();
    }

    public void setId(Long id) {
        user.setId(id);
    }

    public Date getCreateTime() {
        return user.getCreateTime();
    }

    public void setCreateTime(Date createTime) {
        user.setCreateTime(createTime);
    }

    public Date getUpdateTime() {
        return user.getUpdateTime();
    }

    public void setUpdateTime(Date updateTime) {
        user.setUpdateTime(updateTime);
    }
}
